Skip to content

Conversation

@nickvergessen
Copy link
Member

Backport of #7032
Backport of #7036

MySQL docs:
Reject queries for which the select list, HAVING condition, or ORDER BY
list refer to nonaggregated columns that are neither named in the GROUP BY
clause nor are functionally dependent on (uniquely determined by) GROUP BY columns.

MariaDB docs:
For SELECT ... GROUP BY queries, disallow SELECTing columns which are
not referred to in the GROUP BY clause, unless they are passed to an
aggregate function like COUNT() or MAX(). Produce a 1055 error.

Ref https://jira.mariadb.org/browse/MDEV-11588

Similarly Oracle seems to fail with the query before

Signed-off-by: Joas Schilling <[email protected]>
…needs it

Also fixes a problem with MariaDB ONLY_FULL_GROUP_BY and Oracle

Signed-off-by: Joas Schilling <[email protected]>
Also fixes a problem with MariaDB ONLY_FULL_GROUP_BY and Oracle

Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen added this to the 💙 Next Patch (22) milestone Mar 23, 2022
@nickvergessen nickvergessen merged commit 4fac560 into stable22 Mar 23, 2022
@nickvergessen nickvergessen deleted the backport/7032/stable22 branch March 23, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants